home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIInputStreamChannel.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  134 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIInputStreamChannel.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIInputStreamChannel_h__
  6. #define __gen_nsIInputStreamChannel_h__
  7.  
  8.  
  9. #ifndef __gen_nsIChannel_h__
  10. #include "nsIChannel.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIInputStream; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIInputStreamChannel */
  21. #define NS_IINPUTSTREAMCHANNEL_IID_STR "560a64ce-6d66-44db-b38e-864469c52d03"
  22.  
  23. #define NS_IINPUTSTREAMCHANNEL_IID \
  24.   {0x560a64ce, 0x6d66, 0x44db, \
  25.     { 0xb3, 0x8e, 0x86, 0x44, 0x69, 0xc5, 0x2d, 0x03 }}
  26.  
  27. /**
  28.  * nsIInputStreamChannel
  29.  *
  30.  * This interface provides methods to initialize an input stream channel.
  31.  * The input stream channel serves as a data pump for an input stream.
  32.  */
  33. class NS_NO_VTABLE nsIInputStreamChannel : public nsIChannel {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMCHANNEL_IID)
  37.  
  38.   /**
  39.      * Sets the URI for this channel.
  40.      */
  41.   /* void setURI (in nsIURI aURI); */
  42.   NS_IMETHOD SetURI(nsIURI *aURI) = 0;
  43.  
  44.   /**
  45.      * Get/set the content stream
  46.      *
  47.      * This stream contains the data that will be pushed to the channel's
  48.      * stream listener.  If the stream is non-blocking and supports the
  49.      * nsIAsyncInputStream interface, then the stream will be read directly.
  50.      * Otherwise, the stream will be read on a background thread.
  51.      *
  52.      * This attribute can only be changed before the channel is opened.
  53.      *
  54.      * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
  55.      * has been opened.
  56.      */
  57.   /* attribute nsIInputStream contentStream; */
  58.   NS_IMETHOD GetContentStream(nsIInputStream * *aContentStream) = 0;
  59.   NS_IMETHOD SetContentStream(nsIInputStream * aContentStream) = 0;
  60.  
  61. };
  62.  
  63. /* Use this macro when declaring classes that implement this interface. */
  64. #define NS_DECL_NSIINPUTSTREAMCHANNEL \
  65.   NS_IMETHOD SetURI(nsIURI *aURI); \
  66.   NS_IMETHOD GetContentStream(nsIInputStream * *aContentStream); \
  67.   NS_IMETHOD SetContentStream(nsIInputStream * aContentStream); 
  68.  
  69. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  70. #define NS_FORWARD_NSIINPUTSTREAMCHANNEL(_to) \
  71.   NS_IMETHOD SetURI(nsIURI *aURI) { return _to SetURI(aURI); } \
  72.   NS_IMETHOD GetContentStream(nsIInputStream * *aContentStream) { return _to GetContentStream(aContentStream); } \
  73.   NS_IMETHOD SetContentStream(nsIInputStream * aContentStream) { return _to SetContentStream(aContentStream); } 
  74.  
  75. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  76. #define NS_FORWARD_SAFE_NSIINPUTSTREAMCHANNEL(_to) \
  77.   NS_IMETHOD SetURI(nsIURI *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetURI(aURI); } \
  78.   NS_IMETHOD GetContentStream(nsIInputStream * *aContentStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentStream(aContentStream); } \
  79.   NS_IMETHOD SetContentStream(nsIInputStream * aContentStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentStream(aContentStream); } 
  80.  
  81. #if 0
  82. /* Use the code below as a template for the implementation class for this interface. */
  83.  
  84. /* Header file */
  85. class nsInputStreamChannel : public nsIInputStreamChannel
  86. {
  87. public:
  88.   NS_DECL_ISUPPORTS
  89.   NS_DECL_NSIINPUTSTREAMCHANNEL
  90.  
  91.   nsInputStreamChannel();
  92.  
  93. private:
  94.   ~nsInputStreamChannel();
  95.  
  96. protected:
  97.   /* additional members */
  98. };
  99.  
  100. /* Implementation file */
  101. NS_IMPL_ISUPPORTS1(nsInputStreamChannel, nsIInputStreamChannel)
  102.  
  103. nsInputStreamChannel::nsInputStreamChannel()
  104. {
  105.   /* member initializers and constructor code */
  106. }
  107.  
  108. nsInputStreamChannel::~nsInputStreamChannel()
  109. {
  110.   /* destructor code */
  111. }
  112.  
  113. /* void setURI (in nsIURI aURI); */
  114. NS_IMETHODIMP nsInputStreamChannel::SetURI(nsIURI *aURI)
  115. {
  116.     return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118.  
  119. /* attribute nsIInputStream contentStream; */
  120. NS_IMETHODIMP nsInputStreamChannel::GetContentStream(nsIInputStream * *aContentStream)
  121. {
  122.     return NS_ERROR_NOT_IMPLEMENTED;
  123. }
  124. NS_IMETHODIMP nsInputStreamChannel::SetContentStream(nsIInputStream * aContentStream)
  125. {
  126.     return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128.  
  129. /* End of implementation class template. */
  130. #endif
  131.  
  132.  
  133. #endif /* __gen_nsIInputStreamChannel_h__ */
  134.